.App {
  height: 100vh; /* 将100%改为100vh确保基于视口高度 */
  width: 100%;
  background-color: #1a1f40;
  color: #ffffff;
  font-family: 'Arial', sans-serif;
  box-sizing: border-box; /* 添加盒模型设置 */
}

.dashboard {
  width: 100%;
  display: grid;
  grid-template-columns: 350px 1fr 350px;
  grid-template-rows: 80px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  height: 100vh;
  padding: 10px;
  box-sizing: border-box;
  overflow: hidden;
}

.header {
  grid-column: 1 / 4;
  background: linear-gradient(90deg, #253195, #3949ab, #4d61d2);  /* 提亮渐变 */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(100, 140, 255, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(100, 140, 255, 0.7);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

.header h1 {
  margin: 0;
  font-size: 2.5rem;
  text-shadow: 0 0 15px rgba(100, 181, 246, 0.9), 
               0 0 30px rgba(100, 181, 246, 0.7),
               0 0 45px rgba(100, 181, 246, 0.5);
  color: #64b5f6;
  font-weight: 500;
  letter-spacing: 3px;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 10px rgba(100, 181, 246, 0.8), 
                 0 0 20px rgba(100, 181, 246, 0.6);
  }
  to {
    text-shadow: 0 0 15px rgba(100, 181, 246, 0.9), 
                 0 0 30px rgba(100, 181, 246, 0.7),
                 0 0 45px rgba(100, 181, 246, 0.5);
  }
}

.left-panel-1,
.left-panel-2,
.right-panel-1,
.right-panel-2 {
  background: rgba(25, 35, 80, 0.7);  /* 提亮面板背景 */
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(100, 181, 246, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 181, 246, 0.5);
  position: relative;
}

.left-panel-1::before,
.left-panel-2::before,
.right-panel-1::before,
.right-panel-2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.8), transparent);
}

.left-panel-1 {
  grid-row: 2 / 3;
    grid-column: 1 / 2;
}

.left-panel-2 {
  grid-row: 3 / 4;
    grid-column: 1 / 2;
}

.right-panel-1 {
  grid-row: 2 / 3;
  grid-column: 3 / 4;
}

/* 无缝滚动样式 */
.realtime-data-container {
  height: calc(100% - 50px);
  overflow: hidden;
  position: relative;
}

.scroll-wrapper {
  height: 100%;
  width: 100%;
}

.scroll-content {
  width: 100%;
}

.data-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(37, 49, 149, 0.5);
  border-radius: 4px;
  border-left: 3px solid #3d85ff;
  transition: all 0.3s ease;
}

.data-item:hover {
  background: rgba(37, 49, 149, 0.8);
  transform: translateX(5px);
  box-shadow: 0 0 10px rgba(61, 133, 255, 0.5);
}

.data-item .time {
  color: #8ac7ff;
  font-size: 0.9rem;
  width: 25%;
}

.data-item .event {
  color: #ffffff;
  font-weight: bold;
  width: 45%;
}

.data-item .status {
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: bold;
  width: 20%;
  text-align: center;
}

.data-item .status-success {
  background: rgba(46, 125, 50, 0.7);
  color: #a5d6a7;
}

.data-item .status-warning {
  background: rgba(237, 108, 2, 0.7);
  color: #ffcc80;
}

.right-panel-2 {
  grid-row: 3 / 4;
  grid-column: 3 / 4;
}
.panel-content{
  height: 100%;
}
.panel-content h2 {
  margin-top: 0;
  color: #64b5f6;  /* 霓虹蓝色标题 */
  border-bottom: 1px solid rgba(100, 181, 246, 0.3);
  padding-bottom: 10px;
  text-shadow: 0 0 5px rgba(100, 181, 246, 0.6);
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
    grid-column: 2 / 3;
  grid-row: 2 / 4;
}

.chart-tabs {
  display: flex;
  gap: 10px;
  background: rgba(25, 35, 80, 0.7);  /* 提亮标签背景 */
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(100, 181, 246, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 181, 246, 0.5);
}

.chart-tabs button {
  flex: 1;
  padding: 10px 0;
  background: rgba(37, 110, 230, 0.3);  /* 提亮按钮背景 */
  color: #8ac7ff;
  border: 1px solid rgba(100, 181, 246, 0.5);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-shadow: 0 0 5px rgba(138, 199, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.chart-tabs button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.chart-tabs button:hover::before {
  left: 100%;
}

.chart-tabs button:hover {
  background: rgba(37, 110, 230, 0.5);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(100, 181, 246, 0.6);
  border-color: rgba(138, 199, 255, 0.8);
}

.chart-tabs button.active {
  background: linear-gradient(90deg, #256de6, #3d85ff);
  box-shadow: 0 0 20px rgba(61, 133, 255, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-color: #3d85ff;
  text-shadow: none;
}

.chart-container {
  flex: 1;
  background: rgba(25, 35, 80, 0.7);  /* 提亮图表容器背景 */
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(100, 181, 246, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 181, 246, 0.5);
  display: flex;
  flex-direction: column;
  position: relative;
}

.chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.8), transparent);
}

.chart {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chart h3 {
  margin-top: 0;
  color: #64b5f6;  /* 霓虹蓝色标题 */
  text-shadow: 0 0 5px rgba(100, 181, 246, 0.6);
}

.chart-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* 摄像头组件样式 */
.camera-container {
  width: 100%;
  height: 100%;
  position: relative;
  /* background-color: #000; */
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.video-wrapper video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.camera-loading,
.camera-error {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 16px;
  z-index: 10;
}

/* 增强版摄像头组件样式 */
.enhanced-camera-container {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #000;
}

.video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

/* 控制按钮样式保持不变 */
.video-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  gap: 5px;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px;
  border-radius: 4px;
}

.video-controls button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.video-controls button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.video-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  gap: 5px;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px;
  border-radius: 4px;
}

.video-controls button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.video-controls button:hover {
  background: rgba(255, 255, 255, 0.3);
}
